package com.alibaba.otter.node.etl.load.loader.db;

import com.alibaba.otter.node.etl.load.loader.LoadContext;
import com.alibaba.otter.node.etl.load.loader.OtterLoader;
import com.alibaba.otter.shared.etl.model.DbBatch;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

import java.util.List;

/**
 * @author baixiaoyun
 * @Date 2021/7/12
 */
public class RabbitMQOtterLoader implements OtterLoader<DbBatch, List<LoadContext>>, BeanFactoryAware {

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {

    }

    @Override
    public List<LoadContext> load(DbBatch dbBatch) {
//        try {
//            return dataBatchLoader.load(dbBatch);
//        } finally {
//            try {
//                sendStat(dbBatch.getRowBatch().getIdentity());
//            } finally {
//                loadStatsTracker.removeStat(dbBatch.getRowBatch().getIdentity());
//            }
//        }
        return null;
    }

}
